package edu.nju.playerservice;

import io.micrometer.core.instrument.MeterRegistry;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@EnableEurekaClient
@EnableCaching
@ServletComponentScan
public class PlayerServiceApplication
{

    public static void main(String[] args)
    {
        SpringApplication.run(PlayerServiceApplication.class, args);
    }


    @Bean
    MeterRegistryCustomizer<MeterRegistry> prometheusConfiguration() {
        return (registry) -> registry.config().commonTags("application", "PlayerService");
    }
}
